package org.example.designPattern.factoryPattern1.service.impl;


import org.example.designPattern.factoryPattern1.factory.TotalFactory;
import org.example.designPattern.factoryPattern1.service.Car;
import org.example.designPattern.factoryPattern1.service.Engine;

//总工厂实现类，由他决定调用哪个工厂的那个实例
public class TotalFactoryReally implements TotalFactory {
public Engine createEngine() {
return new EngineA();
}
public Car createChair() {
return new CarA();
}
}